﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NextCMS.Models;

/// <summary>
/// Summary description for SiteResourcesHelper
/// </summary>
public class SiteResourcesHelper : ISiteResource
{
    ISiteResource siteResources = null;
	public SiteResourcesHelper()
	{
        siteResources = (ISiteResource)NextCMS.DataAccess.Entities.CreateInstance<ISiteResource>();
	}

    public SiteResourceModel GetById(int Id)
    {
        return siteResources.GetById(Id);
    }

    public IEnumerable<SiteResourceModel> GetAllBySiteId(int SiteId)
    {
        return siteResources.GetAllBySiteId(SiteId);
    }

    public IEnumerable<SiteResourceModel> GetAll()
    {
        return siteResources.GetAll();
    }

    public int Save(SiteResourceModel page)
    {
        return siteResources.Save(page);
    }

    public void Delete(int id)
    {
        siteResources.Delete(id);
    }

    public void Edit(SiteResourceModel page)
    {
        siteResources.Edit(page);
    }

    public void Dispose()
    {
        siteResources.Dispose();
        siteResources = null;
    }
}